package lp.xian.equipment.service.impl;

import java.util.List;

import com.ruoyi.common.domain.SupplierGoods;
import com.ruoyi.common.mapper.SupplierGoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lp.xian.equipment.service.ISupplierGoodsService;

/**
 * 商品详情Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-14
 */
@Service
public class SupplierGoodsServiceImpl implements ISupplierGoodsService
{
    @Autowired
    private SupplierGoodsMapper supplierGoodsMapper;

    /**
     * 查询商品详情
     *
     * @param supplierGoodsId 商品详情主键
     * @return 商品详情
     */
    @Override
    public SupplierGoods selectSupplierGoodsBySupplierGoodsId(Integer supplierGoodsId)
    {
        return supplierGoodsMapper.selectSupplierGoodsBySupplierGoodsId(supplierGoodsId);
    }

    /**
     * 查询商品详情列表
     *
     * @param supplierGoods 商品详情
     * @return 商品详情
     */
    @Override
    public List<SupplierGoods> selectSupplierGoodsList(SupplierGoods supplierGoods)
    {
        return supplierGoodsMapper.selectSupplierGoodsList(supplierGoods);
    }

    /**
     * 新增商品详情
     *
     * @param supplierGoods 商品详情
     * @return 结果
     */
    @Override
    public int insertSupplierGoods(SupplierGoods supplierGoods)
    {
        return supplierGoodsMapper.insertSupplierGoods(supplierGoods);
    }

    /**
     * 修改商品详情
     *
     * @param supplierGoods 商品详情
     * @return 结果
     */
    @Override
    public int updateSupplierGoods(SupplierGoods supplierGoods)
    {
        return supplierGoodsMapper.updateSupplierGoods(supplierGoods);
    }

    /**
     * 批量删除商品详情
     *
     * @param supplierGoodsIds 需要删除的商品详情主键
     * @return 结果
     */
    @Override
    public int deleteSupplierGoodsBySupplierGoodsIds(Integer[] supplierGoodsIds)
    {
        return supplierGoodsMapper.deleteSupplierGoodsBySupplierGoodsIds(supplierGoodsIds);
    }

    /**
     * 删除商品详情信息
     *
     * @param supplierGoodsId 商品详情主键
     * @return 结果
     */
    @Override
    public int deleteSupplierGoodsBySupplierGoodsId(Integer supplierGoodsId)
    {
        return supplierGoodsMapper.deleteSupplierGoodsBySupplierGoodsId(supplierGoodsId);
    }
}
